package it.rap.applications.pages.widgets;

import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.custom.CLabel;

public class RoleTreeDetailWidget extends Composite {

	/**
	 * 
	 */
	private static final long serialVersionUID = -8251423003335219991L;
	private final Composite contentComp;
	private Group detailRoleGroup;
	
	private Label nameRoleLabel;
	private Label nameRoleLabelValue;
	
	private Label descRoleLabel;
	private CLabel descRoleLabelValue;
	
	private Label regExpRoleLabel;
	private CLabel regExpRoleLabelValue;

	public RoleTreeDetailWidget(Composite parent) {
		super(parent, SWT.NONE);
		setLayout( new GridLayout(1, false) );
	
		contentComp = createTreeDetailComposite();
	}

	private Composite createTreeDetailComposite() {
		Composite contentComp = new Composite(this, SWT.NONE);
		contentComp.setLayout(new GridLayout(2, false));
		
		detailRoleGroup = new Group(contentComp, SWT.NONE);
		GridData gd_detailFilterGroup = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
		gd_detailFilterGroup.heightHint = 257;
		gd_detailFilterGroup.widthHint = 304;
		detailRoleGroup.setLayoutData(gd_detailFilterGroup);
		detailRoleGroup.setBounds(0, 0, 205, 75);
		detailRoleGroup.setText("Role");
		detailRoleGroup.setLayout(new GridLayout(2, false));
		
		nameRoleLabel = new Label(detailRoleGroup, SWT.NONE);
		nameRoleLabel.setText("Name");
		
		nameRoleLabelValue = new Label(detailRoleGroup, SWT.BORDER);
		GridData gd_nameFilterLabelValue = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
		gd_nameFilterLabelValue.widthHint = 167;
		nameRoleLabelValue.setLayoutData(gd_nameFilterLabelValue);
		nameRoleLabelValue.setText( "*" );
		
		descRoleLabel = new Label(detailRoleGroup, SWT.NONE);
		descRoleLabel.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, false, false, 1, 1));
		descRoleLabel.setText("Descrizione");
		
		descRoleLabelValue = new CLabel(detailRoleGroup, SWT.BORDER);
		GridData gd_descFilterLabelValue = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
		gd_descFilterLabelValue.heightHint = 109;
		gd_descFilterLabelValue.widthHint = 208;
		descRoleLabelValue.setLayoutData(gd_descFilterLabelValue);
		descRoleLabelValue.setText("*");
		
		regExpRoleLabel = new Label(detailRoleGroup, SWT.NONE);
		regExpRoleLabel.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, false, false, 1, 1));
		regExpRoleLabel.setText("Regola");
		
		regExpRoleLabelValue = new CLabel(detailRoleGroup, SWT.BORDER);
		GridData gd_descFilterLabelValue2 = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
		gd_descFilterLabelValue2.heightHint = 109;
		gd_descFilterLabelValue2.widthHint = 208;
		regExpRoleLabelValue.setLayoutData(gd_descFilterLabelValue2);
		regExpRoleLabelValue.setText("*");
		new Label(contentComp, SWT.NONE);
		
		return contentComp;
	}	

	public Composite getContentComp() {
		return contentComp;
	}

	public Group getDetailRoleGroup() {
		return detailRoleGroup;
	}

	public Label getNameRoleLabel() {
		return nameRoleLabel;
	}

	public Label getNameRoleLabelValue() {
		return nameRoleLabelValue;
	}

	public Label getDescRoleLabel() {
		return descRoleLabel;
	}

	public CLabel getDescRoleLabelValue() {
		return descRoleLabelValue;
	}

	public Label getRegExpRoleLabel() {
		return regExpRoleLabel;
	}

	public CLabel getRegExpRoleLabelValue() {
		return regExpRoleLabelValue;
	}
}
